<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blogmer Documentation</title>

<style type='text/css' media='all'>@import url('../css/userguide.css');</style>
<link rel='stylesheet' type='text/css' media='all' href='../css/userguide.css' />

<meta http-equiv='expires' content='-1' />
<meta http-equiv= 'pragma' content='no-cache' />
<meta name='robots' content='all' />
</head>
<body>
<!-- START NAVIGATION -->
<div id="nav"><div id="nav_inner"></div></div>
<div id="nav2"><a name="top">&nbsp;</a></div>
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td><h1>Blogmer beta 2</h1></td>
<td id="breadcrumb_right"><a href="table_of_content.html">Table of contents</a></td>
</tr>
</table>
</div>
<!-- END NAVIGATION -->


<!-- START BREADCRUMB -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td id="breadcrumb">
  <p><a href="http://speedovation.org/" >Speedovation</a> &nbsp;&#8250;&nbsp;
      <a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
    Table of contents</p>
  </td>

</tr>
</table>
<!-- END BREADCRUMB -->

<br clear="all" />

<!-- START CONTENT -->
<div id="content">


<h1>Users_model</h1>

<p>Users_model is used to create and manage posts (blog).</p>

<p class="important"><strong>Beta:</strong>&nbsp; This is an <kbd>Beta</kbd> model. It can be changed anytime.</p>
	
<p>Functions:</p>

<ul><li>ForgetPassword()</li>
  <li> ResetPassword()</li>
  <li>ActivateUser()</li>
  <li> UserRegistration()</li>
  <li>ViewProfile($id)</li>
  <li>DeleteUser($userid,$pageid)</li>
  <li>activate_user($user_id,$page_id)</li>
  <li>deactivate_user($user_id,$page_id)</li>
  <li>edit_user($user_id,$page_id)</li>
  <li>create_user()</li>
  <li>list_users($pageid)</li>
  </ul>

<p class="important">Admin and user functions share same model</p>
<h2>Users_model Function Reference</h2>

<h3>$this-&gt;Users_model-&gt;ForgetPassword()</h3>
<p>This function takes email as input<em> using input class</em> and generate an reset password url. Send mail to user containing URL for reseting the password.</p>
<p>Output: A String</p>
<p class="important">Note: Mail containing password reset url is sent to the user's email. </p>
<h3>$this-&gt;Users_model-&gt; ResetPassword()</h3>
<p>This function will reset the current password and generate a new password.</p>
<h3>$this-&gt;Users_model-&gt;ActivateUser()</h3>
<p>On  registration email verfication link is sent to user's email id.This functions takes profile id and check id as input and activate the user's account.</p>
<p></p>
<h3>$this-&gt;Users_model-&gt; UserRegistration()</h3>
<p>Capture the posted data  using input class. Store this data into database. No argument. User's profile is created.</p>
<p></p>
<h3>$this-&gt;Users_model-&gt;ViewProfile($id)</h3>
<p>Takes profile id as input and gives a table based profile output in string format.</p>
<h3>$this-&gt;Users_model-&gt;DeleteUser($user_id,$page_id)</h3>
<p>Deletes an already existing data entry of id $user_id and redirects it to $page_id .</p>
<h3>$this-&gt;Users_model-&gt;activate_user($user_id,$page_id)</h3>
<p>Activate the user.</p>
<h3>$this-&gt;Users_model-&gt;deactivate_user($user_id,$page_id)</h3>
<p>Deactivate the user.</p>
<h3>$this-&gt;Users_model-&gt;edit_user($user_id,$page_id)</h3>
<p>Grab the posted data using input class. Updates an already existing data entry of id $user_id and redirects it to $page_id .</p>
<h3>$this-&gt;Users_model-&gt;create_user()</h3>
<p>Create a new user.</p>
<h3>$this-&gt;Users_model-&gt;list_users($pageid)</h3>
<p>Show the all post entries into a tabular form with values.</p>
<p>Registration | Date | Member Name | User Status | Profile | Edit | Delete </p>
<h2>Final Collection</h2>
<p>
	<code>
    	$this->load->model('Users_model');<br />
        $this->Users_model->ForgetPassword();<br />
        $this-&gt;Users_model-&gt;ResetPassword();<br />
        $this->Users_model->ActivateUser();<br />
        $this->Users_model->UserRegistration();<br />
        $this->Users_model->ViewProfile($id);<br />
        $this-&gt;Users_model-&gt;DeleteUser($userid,$pageid);<br />
	$this-&gt;Users_model-&gt;activate_user($user_id,$page_id);<br />
	$this-&gt;Users_model-&gt;deactivate_user($user_id,$page_id);<br />
	$this-&gt;Users_model-&gt;edit_user($user_id,$page_id);<br />
	$this-&gt;Users_model-&gt;list_users($pageid);<br />
	</code></p>

</div>
<!-- END CONTENT -->


<div id="footer">
<p><a href="#top">Top of Page</a></p>
<p><a href="http://speedovation.com">Speedovation</a> &nbsp;&middot;&nbsp; Copyright &#169; 2007-2008 &nbsp;&middot;&nbsp; <a href="http://speedovation.org/">Blogmer</a></p></div>

</body>
</html>